﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Hi_Baidu.ProcessModel
{
    class UserViewModel : Model
    {
        /// <summary>
        ///     将新的用户头像更新到当前所有的聊天窗口中
        /// </summary>
        /// <param name="HeadImage" type="string">
        ///     <para>
        ///         新的用户头像文件地址
        ///     </para>
        /// </param>
        public static void ChangeHeadImageToTalkWindow(String HeadImage)
        {
            List<IMetaData> Windows = Globle.popWindowManager.GetMember();
            for (int i = 0; i < Windows.Count; i++)
            {
                //是聊天窗口则 --> 更新头像
                if(Windows[i] is Win_TalkWindow)
                {
                    (Windows[i] as Win_TalkWindow).FHIC_MySelf.HeadImagePath = HeadImage;
                    (Windows[i] as Win_TalkWindow).FHIC_MySelf.Init();
                }
            }
        }
    }
}
